#!/usr/bin/env python
# -*- coding: utf-8 -*-
import web
import config


class db:
    """获取 mysql 数据库连接"""
    @staticmethod
    def mysql():
        return web.database(
            dbn='mysql',
            db=config.MYSQL_DATABASE,
            user=config.MYSQL_USERNAME,
            pw=config.MYSQL_PASSWORD
        )
